import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementPlus from 'element-plus'

import '@/styles/index.scss'
import 'element-plus/dist/index.css'

import zhCn from 'element-plus/es/locale/lang/zh-cn'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import { VueSvgIconPlugin } from '@yzfe/vue3-svgicon'
import '@yzfe/svgicon/lib/svgicon.css'

// clipboard copy组件 通过下面代码则可以直接使用 v-clipboard 具体看实例
import { VueClipboard } from '@soerenmartius/vue3-clipboard'

const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

app.use(store).use(router)
  .use(ElementPlus, { locale: zhCn })
  .use(VueSvgIconPlugin, { tagName: 'svg-icon' })
  .use(VueClipboard)
  .mount('#app')
